package com.aaa;

public class FinalTest {
    public static void main(String[] args) {
        new Person("1");


    }
}

class Animal {

    public Animal(String name) {
        System.out.println("我是Animal的有参构造器");
        this.name = name;
    }


    static {
        System.out.println("我是Animal的静态代码块");
    }

    private static Integer age = year();


    {
        System.out.println("我是Animal的普通代码块");
    }

    private String name = noise();


    public String noise() {
        System.out.println("我是Animal的普通成员name");
        return "";
    }

    public static int year() {
        System.out.println("我是Animal的静态成员year");
        return 0;
    }

}


class Person extends Animal {

    public Person(String name) {
        super(name);
        System.out.println("我是Person的有参构造器");
        this.name = name;
    }

    {
        System.out.println("我是Person的普通代码块");
    }

    private String name = say();


    static {
        System.out.println("我是Person的静态代码块");
    }

    private static Integer age = year();


    public String say() {
        System.out.println("我是Person的普通成员name");
        return "";
    }

    public static int year() {
        System.out.println("我是Person的静态成员age");
        return 0;
    }

}